
exports.fetchclassData = (url) => {
    return new Promise((resolve,rej) =>{
        axios.get(`${url}`).then(response => {
            resolve(response)
        });
    })

}
exports.listContent = (url,classId) => {
    return new Promise((resolve,rej) =>{
        axios.get(`${url}${classId}`).then(response => {
            resolve(response)
        });
    })
}
exports.addContent = (url,parms) => {
    return new Promise((resolve,rej) =>{
        axios.post(`${url}`,JSON.stringify(parms),{
           headers:{
               'Content-Type':'application/json'
           }
        }).then(response => {
            resolve(response)
        });
    })

}